home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / robo42_a.zip / MESSAGE.RS < prev    next >
Text File  |  1992-07-23  |  2KB  |  71 lines

  1. ;╒═════════════════════════════════════════════════════════════════════╕
  2. ;│ File:    MESSAGE.RS - Robocomm 4.1 script file                      │
  3. ;│ Author:  Dan Parsons                                                │
  4. ;│ Version: 1.0                                                        │
  5. ;│ Revised: 04/17/92                                                   │
  6. ;│                                                                     │
  7. ;│ Notes:   Requires that the PCBoard is using the "default" prompts.  │
  8. ;╘═════════════════════════════════════════════════════════════════════╛
  9. TITLE "ASCII Upload a message to PCBoard 14.5"
  10. PARAMETER 1 "Text file containing message            "
  11. PARAMETER 2 "Conference         (Empty=Main)"
  12. PARAMETER 3 "To                 (Empty=ALL)"
  13. PARAMETER 4 "Subject            (Required)"
  14. PARAMETER 5 "Security           (R=Private, N=Public)"
  15. PARAMETER 6 "Echo Message       (Y/N)"
  16. PARAMETER 7 "Erase after send   (Y/N)"
  17. ENDPARAMS
  18.  
  19. ; Validate parameters
  20. IF NOT EXIST "%P1%" GOTO NOFILE
  21. IF EMPTY "%P4%" GOTO NOSUBJECT
  22.  
  23. ; Get to correct conference to send message
  24. VENUE MAIN
  25. IF EMPTY "%P2%" JOIN "0"
  26. IF NOT EMPTY "%P2%" JOIN "%P2%"
  27.  
  28. ; Enter the Message
  29. MESSAGE "Sending message file %P1% to %P3%"
  30. MESSAGE "  sec: %P5%  echo: %P6%  re: %P4%"
  31. SEND "E|"
  32. WHEN "TO (ENTER)"       SEND "%P3%|"
  33. WHEN "SUBJECT ("        SEND "%P4%|"
  34. WHEN "MESSAGE SECU"     SEND "%P5%|"
  35. WHEN "(ENTER)=Y?"       SEND "%P6%|"
  36. WHEN "USE FULL SCR"     SEND "N|"
  37. WHEN "(ESC) TO EXIT"    SEND "U|"
  38. WHEN "(ENTER) ALONE"    SEND "|U|"
  39. WAITFOR "UPLOAD MODE"
  40.  
  41. ; Upload the message
  42. UPLOAD "%P1%" USING "ASCII"
  43.  
  44. ; Save it
  45. SEND "||S|"
  46.  
  47. ;Make sure
  48. TIMEOUT 10
  49. WAITFOR "SAVING" FAILURE GOTO ERROR
  50. IF YES "%P7%" GOSUB KILLIT
  51. EXIT 0
  52.  
  53. :KILLIT
  54.     MESSAGE "Erasing message file %P1%"
  55.     ERASE "%P1%"
  56. RETURN
  57.  
  58. :ERROR
  59.     MESSAGE "ERROR: Undetermined error uploading the message"
  60.     SEND "A|||||"
  61. EXIT 1
  62.  
  63. :NOSUBJECT
  64.     MESSAGE "ERROR: Missing message subject"
  65. EXIT 1
  66.  
  67. :NOFILE
  68.     MESSAGE "ERROR: Unable to open message file: %P1%"
  69. EXIT 1
  70.  
  71.